package fm.sys.token;

import org.apache.shiro.authc.HostAuthenticationToken;
import org.apache.shiro.authc.RememberMeAuthenticationToken;

public class ClientUserToken implements HostAuthenticationToken, RememberMeAuthenticationToken {
    private String id;
    private String openid;
    private String devType;

    public String getDevType() {
        return devType;
    }

    public void setDevType(String dev) {
        this.devType = dev;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }


    public ClientUserToken(String id, String openid, String devType) {
        this.id = id;
        this.openid = openid;
        this.devType = devType;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String getHost() {
        return null;
    }

    @Override
    public boolean isRememberMe() {
        return false;
    }

    @Override
    public Object getPrincipal() {
        return this.id;
    }

    @Override
    public Object getCredentials() {
        return this.openid;
    }
}
